//=============================================================================
// tfHUDInfo3Msg.
//=============================================================================
class tfHUDInfo3Msg extends LocalMessage;

static function string GetString(
    optional int Switch,
    optional PlayerReplicationInfo RelatedPRI_1,
    optional PlayerReplicationInfo RelatedPRI_2,
    optional Object OptionalObject
    )
{
    local SentinelUpgrade shield;
    if(OptionalObject==none)
        return "";
    if(tfStation(OptionalObject)!=none)
        return string(tfStation(OptionalObject).grade);
    else if(ShieldSentinel(OptionalObject)!=none)
        return string(ShieldSentinel(OptionalObject).shieldamount);
    else if(Sentinel(OptionalObject)!=none && sentinel(OptionalObject).Upgrade != None)
    {
        shield=Sentinel(OptionalObject).Upgrade.GetUpgrade("Molecular Shield");
        if (shield==None) return "0";
        else return string(SentinelShield(shield).shieldamount);
    }
    else if(pawn(OptionalObject)!=none && pawn(OptionalObject).playerreplicationinfo!=none && tfpri(pawn(OptionalObject).playerreplicationinfo) != none)
    {
        //if(relatedpri_1.Team.teamindex!=pawn(OptionalObject).playerreplicationinfo.team.teamindex)
            return string(tfpri(pawn(OptionalObject).playerreplicationinfo).UsedCredits);
    }
    return "";
}

defaultproperties
{
     bIsUnique=True
     bIsConsoleMessage=False
     bFadeMessage=True
     Lifetime=1
     DrawColor=(B=235,G=235,R=235)
     PosY=0.850000
}
